home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / sethostresorder.z / sethostresorder
Encoding:
Text File  |  1998-10-20  |  2.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4. SSSSEEEETTTTHHHHOOOOSSSSTTTTRRRREEEESSSSOOOORRRRDDDDEEEERRRR((((3333NNNN))))                                        SSSSEEEETTTTHHHHOOOOSSSSTTTTRRRREEEESSSSOOOORRRRDDDDEEEERRRR((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sethostresorder - specify order of host-address resolution services
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      iiiinnnntttt sssseeeetttthhhhoooossssttttrrrreeeessssoooorrrrddddeeeerrrr((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****oooorrrrddddeeeerrrr))));;;;
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _g_e_t_h_o_s_t_b_y_n_a_m_e(3N) and _g_e_t_h_o_s_t_b_y_a_d_d_r(3N) routines can access three
  16.      types of host-address databases:
  17.  
  18.      +o  the hosts file, /etc/hosts,
  19.  
  20.      +o  Sun's network information service (NIS) and
  21.  
  22.      +o  the Berkeley Internet Name Domain service ("BIND name server").
  23.  
  24.      _s_e_t_h_o_s_t_r_e_s_o_r_d_e_r allows a program to specify the order of services to
  25.      resolve Internet addresses and hostnames from these databases.
  26.  
  27.      _s_e_t_h_o_s_t_r_e_s_o_r_d_e_r should be called before the first time _g_e_t_h_o_s_t_b_y_n_a_m_e and
  28.      _g_e_t_h_o_s_t_b_y_a_d_d_r are called.  The _o_r_d_e_r argument is a character string that
  29.      contains keywords for the lookup services.  See the description of
  30.      _h_o_s_t_r_e_s_o_r_d_e_r in _r_e_s_o_l_v_e_r(4) for the list and meaning of keywords and
  31.      separators.  The colon (:) character is equivalent to white space as a
  32.      keyword separator.  For example,
  33.  
  34.           sethostresorder("nis bind local");
  35.           sethostresorder("nis:bind:local");
  36.  
  37.      are equivalent.
  38.  
  39.      There are two versions of this routine:  the standard  version in libc
  40.      and the NIS version in libsun.  The programmatic interface of both
  41.      versions is identical, except the standard version ignores the NIS
  42.      keyword. The libc default order is ``bind / local'' and the libsun
  43.      default is ``nis / bind / local''.
  44.  
  45.      This routine overrides the order specified by the _h_o_s_t_r_e_s_o_r_d_e_r keyword in
  46.      /_e_t_c/_r_e_s_o_l_v._c_o_n_f and the HOSTRESORDER environment variable.
  47.  
  48. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  49.      _s_e_t_h_o_s_t_r_e_s_o_r_d_e_r returns 0 if the order was changed, otherwise it returns
  50.      -1.  Unrecognized keywords are ignored.
  51.  
  52. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  53.      intro(3), gethostbyname(3N), resolver(4)
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.